home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / MEDICAL / 2608A.ZIP / BUGFIXGP.ZIP / RECALL3.SRC < prev    next >
Text File  |  1990-11-21  |  11KB  |  296 lines

  1. ;\|
  2. ;RECALL3.SRC     Translated from RECALL3.EDT by Roger Mathew's EDT2SRC Ver 4.11
  3. ;START    04:06:16 PM   6/ 8/90   |
  4. RECALLSX:
  5. define(MEM_DOC|A|20||)
  6. define(Z30|A|30||)
  7. define(LINE|N|2||)
  8. define(PUNC2|N|2||)
  9. define(CH_NAME|A|15||)
  10. define(HIS|A|3||)
  11. define(CL_DAY|A|32||)
  12. define(PUNC2|N|2||)
  13. define(CNTR|N|2||)
  14. define(FLAG|A|1||)
  15. define(AMOUNTX|N|4||)
  16. define(S10|A|10||)
  17. define(DATECOD|S|8||)
  18. define(CODER|A|5||)
  19. define(C30|A|30||)
  20. define(TM|A|27||4)
  21. define(A30|A|30||)
  22. define(CHOICE|N|1||)
  23. define(TDND|S|8||)
  24. define(DATERP|S|8||)
  25. define(B30|A|30||)
  26. define(S1|A|1||)
  27. define(TD|S|8||)
  28. define(A8|A|8||)
  29. define(B8|A|8||)
  30. define(YES.NO|A|1||)
  31. define(N5|N|5||)
  32. define(D1|A|1||)
  33. define(NY|A|1||)
  34. define(CODEX1|S|8||)
  35. define(CTR|N|2||)
  36. define(DATEN|N|2||)
  37. define(DATEX|S|8||)
  38. define(TIT|A|4||)
  39. define(PATIENT1A|A|30||)
  40. define(PUNC1|N|2||)
  41. define(N.2.0.P|N|2||)
  42. define(P.2.0.1|N|2||)
  43. define(P.2.0.2|N|2||)
  44. define(PATIENT2|A|30||)
  45. define(P.2.0.3|N|2||)
  46. define(RECTYPE1|A|4||)
  47. define(RECTYPE2|A|4||)
  48. define(PATIENT1|A|30||)
  49. define(TEMP_DATE|S|8||)
  50. open(PATIENT||0|FILE_LOCK)
  51. open(GPSETUP||0|)
  52. open(RECALLS||0|FILE_LOCK)
  53. find(B|HEADING||)
  54. D1 = ("")
  55. date(TD|G)
  56. YES.NO = ("")
  57. DATEX = (0)
  58. DATEN = (0)
  59. CODEX1 = (0)
  60. NY = ("")
  61. trap(I|G|PRINTSTOP)
  62. trap(S|I)
  63. trap(D|I)
  64. trap(F|I)
  65. trap(R|I)
  66. trap(B|I)
  67. trap(G|I)
  68. trap(H|S|HELP)
  69. trap(M|I)
  70. trap(N|I)
  71. trap(Q|G|MENU)
  72. open(gpsetup|||)
  73. mount(RECALLS|S)
  74. find(b|heading||)
  75. CTR = (1)
  76. enter(TEMP_DATE||||N|N|N|||N)
  77. enter(NY|"YN"|||Y|Y|N|||N)
  78. if NY <> ("Y") goto EXIT
  79. pchr(P|4)
  80. RECSTART:
  81. COD.PAT.NAME = ("A")
  82. find(G|COD.PAT.NAME|EXIT|N)
  83. RECTEST:
  84. if COD.D[CTR] = (0) goto NEXTRECALL
  85. if COD.D[CTR] > (TEMP_DATE) goto NEXTRECALL
  86. RECORD.NUMBER = (COD.REF)
  87. DATECOD = (COD.D[CTR])
  88. CODER = (COD[CTR])
  89. find(M|RECORD.NUMBER|EXIT|)
  90. DATERP = (COD.D[CTR])
  91. gosub PRINTRECAL
  92. NEXTRECALL:
  93. find(N|RECALLS|EXITX|)
  94. goto RECTEST
  95. SEXIST:
  96. if SEX = ("M") do
  97. {
  98. TIT = ("Mr.")
  99. HIS = ("his")
  100. }
  101. if SEX = ("F") do
  102. {
  103. if MARITAL.STATUS = ("M") do
  104. {
  105. TIT = ("Mrs.")
  106. }
  107. else
  108. {
  109. TIT = ("Ms.")
  110. }
  111. HIS = ("her")
  112. }
  113. if SEX = ("") then TIT = ("Ms.")
  114. trim(TIT|T)
  115. ret
  116. NEWX:
  117. PATIENT1A = (PATIENT.NAME)
  118. PUNC1 =loc(","|PATIENT1A|1||27)
  119. PUNC1 = (PUNC1-1)
  120. PATIENT2 =mid(PATIENT.NAME|1|PUNC1|)
  121. PUNC1 = (PUNC1+3)
  122. P.2.0.2 = (27-PUNC1)
  123. PATIENT1 =mid(PATIENT1A|PUNC1|P.2.0.2|)
  124. PUNC2 =loc(" "|PATIENT1|1||P.2.0.2)
  125. CH_NAME =mid(PATIENT1|1|PUNC2|)
  126. trim(PATIENT1|T)
  127. trim(PATIENT2|T)
  128. Z30 = (TIT+PATIENT1+NY+PATIENT2)
  129. trim(CH_NAME|T)
  130. mem_doc = (rpdoctor[doctor])
  131. ret
  132. CLEARALL:
  133. clr(PATIENT|B)
  134. clr(RECALLS|B)
  135. S1 = ("")
  136. DATEX = (0)
  137. YES.NO = ("")
  138. ret
  139. EXIT:
  140. run("recmenu")
  141. EXIT1:
  142. run("recmenu")
  143. PRINTSTOP:
  144. pon(S)
  145. clrlne(1|25)
  146. pmsg("CONTINUE ? (Y/N):"|30|12|N|N|S|)
  147. enter(YES.NO|"YN"||PRINTSTOP|Y|Y|N|48|12|N)
  148. if YES.NO <> ("Y") then run("recmenu")
  149. pon(P)
  150. ret
  151. MENU:
  152. TM[1] = (" 1 - EXIT             01011")
  153. menu(1|20|2|23|0|TM|CHOICE|1|22|MENU||"-------RECALLS--------"|N)
  154. on(CHOICE|G|EXIT1|MENU)
  155. TRACE:
  156. break
  157. ret
  158. FILE_LOCK:
  159. pmsg("FILE PATIENT AND/OR RECALLS IS IN USE - EXIT"|20|24|Y|N|S|)
  160. clrlne(1|24)
  161. run("recmenu")
  162. HELP:
  163. saves(1)
  164. window(1|23|22|78)
  165. pmsg("                                    SMEAR RECALLS"|1|1|N|Y|S|)
  166. pmsg("                                    ============="|1|2|N|Y|S|)
  167. pmsg("1.USE UPDATE PROGRAM AND MAKE SURE ALL WOMEN BETWEEN 33 AND 65 ARE ENTERED"|1|3|N|Y|S|)
  168. pmsg("2.ALL THESE WOMEN MUST HAVE A RECALL DATE."|1|4|N|Y|S|)
  169. pmsg("3.RUN REPORT ONLY TO GET LATEST UPDATE ON TOTAL AT-RISK GROUP"|1|5|N|Y|S|)
  170. pmsg("4.RECALL EVERY MONTH ON THE 16th + A DAY OR TWO"|1|6|N|Y||)
  171. pmsg("5.CHECK OFF AGAINST RECALL LIST. ALL NON-ATTENDERS WILL BE ASKED AGAIN"|1|7|N|Y|S|)
  172. pmsg("6.NON-ATTENDERS WILL BE THOSE WHO ARE MORE THAN ONE MONTH BEHIND"|1|8|N|Y||)
  173. pmsg(""|1|9|N|Y|S|)
  174. pmsg("                                    CODES"|1|10|N|Y|S|)
  175. pmsg("                                    ====="|1|11|N|Y|S|)
  176. pmsg("CODE 1 = SMEARS"|1|12|N|Y|S|)
  177. pmsg("CODE 2 = CONTRACEPTION"|1|13|N|Y|S|)
  178. pmsg("CODE 3 = IMMUNISATION"|1|14|N|Y|S|)
  179. pmsg("CODE 4 = DIABETES"|1|15|N|Y|S|)
  180. pmsg("CODE 5 = EPILEPSY"|1|16|N|Y|S|)
  181. pmsg("CODE 6 = THYROID"|1|17|N|Y|S|)
  182. pmsg("CODE 7 = ANGINA AND HEART DISEASE"|1|18|N|Y|S|)
  183. pmsg("CODE 8 = ASTHMA"|1|19|N|Y|S|)
  184. pmsg("CODE 9 = BP"|1|20|N|Y|S|)
  185. pmsg(""|1|21|Y|N|S|)
  186. redsp(1)
  187. ret
  188. ;IMMUN    01:33:54 AM   8/11/89   |
  189. PRINTRECAL:
  190. gosub SEXIST
  191. gosub NEWX
  192. pset(140|72|72)
  193. pmsg(%27;%120;%49;%27;%112;%49;%27;%107;%49|||N|N|P|)
  194. pmsg("                      ";%27;%119;%49;%27;%80;%14;%18;let_title;%27;%119;%48;%27;%112;%48|||N|N|P|)
  195. pmsg(%27;%15;%27;%71;""|||N|N|P|)
  196. pmsg(title1;"                                                   ";ad1|||N|N|P|)
  197. pmsg(title2;"                                                   ";ad2|||N|N|P|)
  198. pmsg(title3;"                                                   ";ad3|||N|N|P|)
  199. pmsg(Title4;"                                                   ";ad4|||N|N|P|)
  200. pset(90|72|72)
  201. pmsg(%18;%27;%112;%49;%27;%72;""|||N|N|P|)
  202. pmsg(""|||N|N|P|)
  203. pmsg(""|||N|N|P|)
  204. pmsg("                   ";%27;%45;%49;%27;%69;"CERVICAL SMEAR RECALL APPOINTMENT";%27;%45;%48;%27;%70|||N|N|P|)
  205. pmsg(""|||N|N|P|)
  206. pmsg(""|||N|N|P|)
  207. pmsg("Dear ";TIT;PATIENT2;","|||N|N|P|)
  208. pmsg(""|||N|N|P|)
  209. pmsg(" We note from our records that your smear test is now due."|||N|N|P|)
  210. pmsg(""|||N|N|P|)
  211. pmsg("As you know this procedure is";%27;%69;" VERY IMPORTANT ";%27;%70;"for your future health."|||N|N|P|)
  212. pmsg("A cervical smear is the ";%27;%69;"ONLY ";%27;%70;"way of preventing deadly disease of the cervix."|||N|N|P|)
  213. pmsg(""|||N|N|P|)
  214. pmsg(%27;%69;"This disease is on the increase ";%27;%70;"so you should protect yourself now."|||N|N|P|)
  215. pmsg(""|||N|N|P|)
  216. pmsg("Your appointment with Sister is at:              on:"|||N|N|P|)
  217. pmsg(""|||N|N|P|)
  218. pmsg("We will be pleased to discuss any worries you may have about the test - just"|||N|N|P|)
  219. pmsg("make an appointment with me or another Doctor."|||N|N|P|)
  220. pmsg(""|||N|N|P|)
  221. pmsg("Please ring the surgery";%27;%69;" today ";%27;%70;"to confirm this appointment or to let us know "|||N|N|P|)
  222. pmsg("if you have decided you";%27;%69;" NEVER ";%27;%70;"want this test,so that we do not keep sending "|||N|N|P|)
  223. pmsg("for you."|||N|N|P|)
  224. pmsg(""|||N|N|P|)
  225. pmsg("Yours sincerely,"|||N|N|P|)
  226. pmsg(""|||N|N|P|)
  227. pmsg(""|||N|N|P|)
  228. pmsg(""|||N|N|P|)
  229. pmsg(""|||N|N|P|)
  230. pmsg(MEM_DOC|||N|N|P|)
  231. pmsg(""|||N|N|P|)
  232. pmsg(%27;%112;%48;%27;%69;%18;%27;%116;%49;%27;%55|||N|Y|P|)
  233. pmsg("   ┌─────────────────────────────────────────────────────────────────┐"|||N|N|P|)
  234. pmsg("   │  PLEASE LOOK TO THE FUTURE AND CARE ABOUT YOURSELF AND FAMILY   │"|||N|N|P|)
  235. pmsg("   └─────────────────────────────────────────────────────────────────┘"|||N|N|P|)
  236. pmsg(%27;%64;%27;%70|||N|Y|P|)
  237. for(LINE|1|25|1)
  238. {
  239. pmsg(""|||N|N|P|)
  240. }
  241. ret
  242. EXITX:
  243. goto EXIT
  244. \SSRECALLS 
  245.                                                                                                 
  246.                                                                                                 
  247.                                                                                                 
  248.                                                                                                 
  249.                                                                                                 
  250.                              SMEAR RECALL LETTER                                                
  251.  ╔════════════════════════════════════════╗                                      ║ This will pri
  252. nt letters to all WOMEN   ║                                      ║ whose recall date is less tha
  253. n         ║                                      ║                            p p p p p p p p     ║     
  254.                                  ║  Continue: p  Y/N                       ║                     
  255.                  ║                                        ║                                     
  256.  ╚════════════════════════════════════════╝                                      Esc - Exit     
  257.                                                                                                 
  258.                                                                                                 
  259.                                                                                                 
  260.                                                                                                 
  261.                                                                                                 
  262.                                                                                                 
  263.                                                                                                 
  264.                                                                                                 
  265. \
  266. TEMP_DATE           8 S 4611
  267. NY                  1 A 3012
  268. \
  269. \STNOTE    
  270.                          RECALLS - WHAT TO DO
  271.                          ====================
  272.  
  273. 1. TO TAG ALL POTENTIAL RECALLS ANSWER RUN RECALLS AT RISK FROM MAIN MENU.
  274.  
  275.   (THIS WILL TAG A GIVEN AGE GROUP WITH CODE <****>)
  276.  
  277. 2. TO UPDATE THE <****> USE EASY SMEAR /IMMUNISATION UPDATE PROGRAM.
  278.  
  279. 3. IF YOU ANSWER NO TO REPORT ONLY YOU WILL PRINT A LIST OF OUTSTANDING
  280.    RECALLS WITH OR WITHOUT LABELS.
  281.  
  282. 6. PRINT OUT THESE AND SEND TO PATIENTS.
  283.  
  284. 7. UPDATE  RESULTS USING EASY RECALL MAINTENANCE
  285.  
  286.         NOTE: THIS PROGRAM WILL ALWAYS PRINT OUT "ALL" OUTSTANDING RECALLS.
  287.  
  288.                           ========================
  289.  
  290.  
  291.  
  292.  
  293.  
  294. \
  295. \
  296.